#!/bin/ksh


function usage {
  print "msg $2"
  print "Usage $1 [process id]" 
  exit 1  
}

#main routine goes here---------
if [[ $# -eq 1  ]];then
  processID=$1
else
  usage $0 "paramter error"  
fi


#check if the process is alive
ls /proc/$processID > /dev/null 2>&1

if [[ $? -eq 0 ]]; then
  cat /proc/$processID/maps | grep -e '.o' -e '.so' | cut -c 74- | uniq 
fi


